import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";

export type SQLParams<T = data> = {
  action?: string;
  description?: string;
  provider?: string;
  keyword?: string;
} & T;
export type CommonResponseData = {
  code: number;
  data: any;
};
/** 获取列表信息(包含字典信息、分页列表信息) */
export const getDataBySQLDesc = <T = data>(data: SQLParams<T>) => {
  return http.request<CommonResponseData>("post", baseUrlApi("biz/query"), {
    data
  });
};
